]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Add missing return values to later_add() handlers
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 22 Jul 2019 18:37:33 +0000 (20:37 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 22 Jul 2019 18:48:16 +0000 (20:48 +0200)
meta_later_add() is modelled after g_idle_add() and friends, and
the handler's boolean return value determines whether it should
be scheduled again or removed. There are some places where we omit
the return value, add them (although the implicit return value of
"undefined" already gives us the intended result).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/637

js/ui/appDisplay.js
js/ui/audioDeviceSelection.js
js/ui/iconGrid.js
js/ui/lookingGlass.js
js/ui/screenShield.js

index 60322f81a70ac9b2929b817de4ec93154c79c48c..8bfdd1707a78b24b774c59c888e036a7374f7e55 100644 (file)
@@ -622,6 +622,7 @@ var AllView = class AllView extends BaseAppView {
                 this._grid.currentPage = 0;
                 this._pageIndicators.setNPages(this._grid.nPages());
                 this._pageIndicators.setCurrentPage(0);
+                return GLib.SOURCE_REMOVE;
             });
         }
 
index 1b65226807c952d6cbdd05c095f0a32d72abd477..d66970482b18456c07c4efeb19e59d6bcfd084b9 100644 (file)
@@ -85,6 +85,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
         box.connect('notify::height', () => {
             Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
                 box.width = box.height;
+                return GLib.SOURCE_REMOVE;
             });
         });
 
index 9a6ddc586b3582dab529fd6b432e76dabae78141..17ca0a98df60e860531889d382083e0c0c92de16 100644 (file)
@@ -768,6 +768,7 @@ var IconGrid = GObject.registerClass({
         for (let i in this._items) {
             this._items[i].icon.setIconSize(newIconSize);
         }
+        return GLib.SOURCE_REMOVE;
     }
 });
 
index 4a6a80abd5545692dbbdf1a442753edd5ae049ab..926f50adc66a2bc0214aada9c4d62b4cbba163d4 100644 (file)
@@ -1011,7 +1011,10 @@ var LookingGlass = class LookingGlass {
     }
 
     _queueResize() {
-        Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => this._resize());
+        Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
+            this._resize();
+            return GLib.SOURCE_REMOVE;
+        });
     }
 
     _resize() {
index 8f4a65d04ab739c90f9c76179ecda6972b74d98a..9e07b5901690f8f204067900a3e39a686d84e142 100644 (file)
@@ -1324,6 +1324,7 @@ var ScreenShield = class {
             return;
         Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
             this.lock(false);
+            return GLib.SOURCE_REMOVE;
         });
     }
 };